package com.qst.Serviceimpl;

import com.qst.Service.OrderService;
import com.qst.dao.OrderMapper;
import com.qst.pojo.Order;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @packageName:com.qst.Serviceimpl
 * @className:OrderServiceimpl
 * @Description:
 * @author:zhangyu
 * @date 2021/6/18 16:53
 **/

@Service
public class OrderServiceimpl implements OrderService {
    @Resource
    OrderMapper orderMapper;

    @Override
    public List<Order> findAllOrder(String username) {
        List<Order> Allorder = orderMapper.findAllOrder(username);
        return Allorder;
    }

    @Override
    public void addorder(Order order) {
        orderMapper.addorder(order);
    }

    @Override
    public List<Order> Orderbytype(String type) {
        List<Order> orderbytype = orderMapper.Orderbytype(type);
        return orderbytype;
    }
}
